Skip to main content
Glama

Delete Surface Element

delete_surface_element
Destructive

Delete a surface element by ID from a document. Optionally set pruneConnectors to true to also remove any connectors linked to it.

Instructions

Delete a surface element by id. Set pruneConnectors=true to also delete any connectors whose source or target referenced the deleted element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYesDocument ID
elementIdYesElement ID to delete
workspaceIdNoWorkspace ID (optional if default set)
pruneConnectorsNoAlso delete connectors referencing this element (default false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
deletedNo
elementIdNo
prunedConnectorsNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate destructiveHint=true, so the description doesn't need to restate that. It adds value by explaining the cascading deletion behavior for connectors, which is not covered by annotations. However, it doesn't mention other potential side effects (e.g., dangling references, permission requirements) that would be useful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the main action, and no fluff. Every word contributes meaning, making it efficient and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the destructive nature and the presence of annotations and an output schema, the description covers the core behavior and the key option. It doesn't elaborate on error cases or prerequisites, but those are partially covered by the schema and annotations. Overall, adequate for a delete tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds marginal detail for pruneConnectors by specifying 'source or target referenced', but this is largely redundant with the schema description. Other parameters have sufficient schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete a surface element by id') with a specific verb and resource. It distinguishes from sibling delete tools by targeting 'surface elements' and specifying the cascading behavior for connectors.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides guidance for the pruneConnectors option ('Set pruneConnectors=true to also delete any connectors...'), but does not explicitly mention when to use this tool versus alternatives like delete_doc or delete_block. Usage context is implied rather than explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/irfanhak123/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server