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 | anthropic-workspace-id | |
list | select | session_id | anthropic-workspace-id | |
update | update | session_id, resource_id, authorization_token | anthropic-workspace-id | |
delete | delete | session_id, resource_id | anthropic-workspace-id | |
add | exec | session_id, type, file_id | anthropic-workspace-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) |
anthropic-workspace-id | string | Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy). Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace. (example: wrkspc_011CZkZaBF1tNoB5wlCeusgy) |
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
AND "anthropic-workspace-id" = '{{ anthropic-workspace-id }}'
;
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 "anthropic-workspace-id" = '{{ anthropic-workspace-id }}'
;
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
AND "anthropic-workspace-id" = '{{ anthropic-workspace-id}}'
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
AND "anthropic-workspace-id" = '{{ anthropic-workspace-id }}'
;
Lifecycle Methods
- add
Successful response (OK)
EXEC anthropic.sessions.resources.add
@session_id='{{ session_id }}' --required,
@anthropic-workspace-id='{{ anthropic-workspace-id }}'
@@json=
'{
"type": "{{ type }}",
"file_id": "{{ file_id }}",
"mount_path": "{{ mount_path }}"
}'
;