Allow or deny a tool for the agent
const url = 'https://api.asklucy.eu/v1/agents/example/tool-permissions/m365/mail_send';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"permission":"allow"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.asklucy.eu/v1/agents/example/tool-permissions/m365/mail_send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "permission": "allow" }'allow or deny, or null for the default (read-only tools allow, others deny). ask is 400. allow
where the organization’s permission isn’t allow is 409 looser-than-organization. Its managers only.
Audited as tool.permission_changed (scope agent, target the tool, details agent_id).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
m365The tool server, a connector (m365) or local (local access).
Example
mail_sendThe tool’s name on its server, without the server prefix.
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”OK
object
The tool server, a connector (m365) or local.
The tool’s name on its server (the model sees <server>.<tool>).
One line on what the tool does, for settings pages.
The connector’s app the tool belongs to (ConnectorApp.id); null for local access.
For local access, whether the tool reads or changes files; null otherwise.
The tool’s MCP annotations the default is read from.
object
It reaches outside the person’s own data, such as other people (sending, inviting).
The server gave annotations (Lucy’s catalog always does). False for a custom server’s tool without any.
What Lucy may do with a tool. allow: it uses the tool without asking. ask: each call waits for the
person’s yes on a card in the chat (Step.approval). deny: the tool is hidden from the model, which
never sees it. Stricter is deny > ask > allow.
What Lucy may do with a tool. allow: it uses the tool without asking. ask: each call waits for the
person’s yes on a card in the chat (Step.approval). deny: the tool is hidden from the model, which
never sees it. Stricter is deny > ask > allow.
An admin set organization; false when it is the tool’s default.
What Lucy may do with a tool. allow: it uses the tool without asking. ask: each call waits for the
person’s yes on a card in the chat (Step.approval). deny: the tool is hidden from the model, which
never sees it. Stricter is deny > ask > allow.
For a custom server’s tool, new or changed since an admin reviewed it; organization is then ask at most.
The values the caller may set: an admin any of the three; a person organization and what is stricter
(only deny when the organization asks, none when it denies).
Example
{ "server": "m365", "tool": "mail_send", "title": "Send an email", "app": "send_mail", "access": "read", "default": "allow", "organization": "allow", "mine": "allow", "effective": "allow", "choices": [ "allow" ]}The request is invalid; errors lists what’s wrong.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Missing, expired or invalid token.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
No such object in your organization.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The object isn’t in a state that allows this (e.g. Lucy is already answering).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.