resources
Creates, updates, deletes, gets or lists a resources resource.
Overview
| Name | resources |
| Type | Resource |
| Id | anthropic.sessions.resources |
Fields
The following fields are returned by SELECT queries:
- get
- list
Successful response (OK)
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
file_id | string | |
memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
access | string | Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem. (read_write, read_only) |
checkout | object | |
created_at | string (date-time) | A timestamp in RFC 3339 format |
description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
instructions | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
mount_path | string | |
type | string | (github_repository) |
updated_at | string (date-time) | A timestamp in RFC 3339 format |
url | string |
Successful response (OK)
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
file_id | string | |
memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
access | string | Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem. (read_write, read_only) |
checkout | object | |
created_at | string (date-time) | A timestamp in RFC 3339 format |
description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
instructions | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
mount_path | string | |
type | string | (github_repository) |
updated_at | string (date-time) | A timestamp in RFC 3339 format |
url | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | session_id, resource_id | ||
list | select | session_id | ||
update | update | session_id, resource_id, authorization_token | ||
delete | delete | session_id, resource_id | ||
add | exec | session_id, type, file_id |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
resource_id | string | Path parameter resource_id (example: sesrsc_011CZkZBJq5dWxk9fVLNcPht) |
session_id | string | Path parameter session_id (example: sesn_011CZkZAtmR3yMPDzynEDxu7) |
SELECT examples
- get
- list
Successful response (OK)
SELECT
id,
name,
file_id,
memory_store_id,
access,
checkout,
created_at,
description,
instructions,
mount_path,
type,
updated_at,
url
FROM anthropic.sessions.resources
WHERE session_id = '{{ session_id }}' -- required
AND resource_id = '{{ resource_id }}' -- required
;
Successful response (OK)
SELECT
id,
name,
file_id,
memory_store_id,
access,
checkout,
created_at,
description,
instructions,
mount_path,
type,
updated_at,
url
FROM anthropic.sessions.resources
WHERE session_id = '{{ session_id }}' -- required
;
UPDATE examples
- update
No description available.
UPDATE anthropic.sessions.resources
SET
authorization_token = '{{ authorization_token }}'
WHERE
session_id = '{{ session_id }}' --required
WHERE resource_id = '{{ resource_id }}' --required
AND authorization_token = '{{ authorization_token }}' --required
RETURNING
id,
name,
file_id,
memory_store_id,
access,
checkout,
created_at,
description,
instructions,
mount_path,
type,
updated_at,
url;
DELETE examples
- delete
No description available.
DELETE FROM anthropic.sessions.resources
WHERE session_id = '{{ session_id }}' --required
AND resource_id = '{{ resource_id }}' --required
;
Lifecycle Methods
- add
Successful response (OK)
EXEC anthropic.sessions.resources.add
@session_id='{{ session_id }}' --required
@@json=
'{
"type": "{{ type }}",
"file_id": "{{ file_id }}",
"mount_path": "{{ mount_path }}"
}'
;