Skip to main content
Glama

deletecontext

Remove outdated or incorrect academic entities, relationships, and observations from your student knowledge graph. Maintain an accurate learning representation by deleting completed courses, obsolete notes, or irrelevant study materials with targeted precision.

Instructions

A precise tool for removing elements from your educational knowledge graph. This tool enables targeted deletion of academic entities, relationships between educational components, or specific observations about study materials. It helps maintain an accurate and current representation of your academic landscape as your learning journey evolves.

When to use this tool:

  • Removing completed or dropped courses

  • Deleting obsolete relationships between academic entities

  • Pruning outdated notes or observations that are no longer relevant

  • Correcting errors in your academic knowledge graph

  • Cleaning up test or practice entities

  • Maintaining graph accuracy as your educational focus changes

  • Removing duplicate learning materials or resources

  • Archiving completed assignments or exams

  • Updating status or priority relations when they change

  • Modifying entity sequences

Key features:

  • Three distinct deletion operation types (entities, relations, observations)

  • Cascading deletion for entities (automatically removes related relations)

  • Precise deletion of specific observations without removing entire entities

  • Targeted relation removal with exact matching on from/to/type

  • Batch operations for efficient cleanup

  • JSON-formatted response with operation results

  • Secure validation before deletion

  • Clear error messages when operations fail

Parameters explained:

  • type: The deletion operation type to perform, which must be one of:

    • "entities" - Remove academic entities and their relations

    • "relations" - Remove specific relationships between entities

    • "observations" - Remove specific observations from entities

  • data: Operation-specific data structure:

    • For "entities": Array of entity names to delete

    • For "relations": Array of objects with { from, to, relationType }

    • For "observations": Array of objects with { entityName, observations[] }

Deletion behavior by type:

  • "entities": Completely removes the specified entities and any relations where they appear

  • "relations": Removes only the exact relations specified, matching on all three attributes

  • "observations": Removes specific observations from entities while preserving the entities themselves

Status and Priority Management:

  • To change an entity's status, delete the old has_status relation and create a new one

  • To change priority, delete the old has_priority relation and create a new one

  • Status values (not_started, in_progress, complete) are managed through relations, not direct properties

  • Priority values (low, high) are managed through relations, not direct properties

Safety considerations:

  • Entity deletion cascades to relations, so be careful when deleting key entities

  • There is no "undo" operation, so confirm deletions carefully

  • Partial graph information can lead to inconsistent views of your academic knowledge

  • Relations require entities on both ends to exist

  • Deleting status or priority relations without replacing them can lead to inconsistent state

  • Consider creating new status/priority relations before deleting old ones

You should:

  1. Identify the specific elements in your academic graph that need to be removed

  2. Choose the appropriate deletion type (entities, relations, or observations)

  3. Structure your data according to the deletion type's requirements

  4. Start with more specific deletions (observations) before broader ones

  5. Verify the entities or relations exist before attempting deletion

  6. When updating status, create a new has_status relation before deleting the old one

  7. When updating priority, create a new has_priority relation before deleting the old one

  8. Consider the impact on entity sequences when deleting follows relations

  9. Check the operation result to confirm successful deletion

  10. Consider documenting major deletions as observations on related entities

  11. When removing an entire course, first delete its components for cleaner removal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesData for the deletion operation, structure varies by type but must be an array
typeYesType of deletion operation: 'entities', 'relations', or 'observations'
Behavior5/5

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

With no annotations provided, the description carries full burden and delivers comprehensive behavioral disclosure. It details three deletion types with specific behaviors (cascading deletion for entities, exact matching for relations), safety considerations (no undo, cascading effects), and status/priority management workflows. It explains JSON-formatted responses, batch operations, and validation processes.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, usage guidelines, features, parameters, behavior, management, safety, procedures) but is quite lengthy. While every section adds value, some redundancy exists (e.g., status/priority management appears in multiple sections), preventing a perfect score for conciseness.

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

Completeness5/5

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

For a destructive tool with no annotations and no output schema, the description provides exceptional completeness. It covers purpose, usage scenarios, parameter semantics, behavioral details, safety considerations, procedural workflows, and edge cases. The absence of output schema is compensated by mentioning 'JSON-formatted response with operation results' and 'Check the operation result' guidance.

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

Parameters5/5

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

Despite 100% schema description coverage, the description adds significant value beyond the schema. It provides detailed 'Parameters explained' and 'Deletion behavior by type' sections that clarify what each parameter means in practice, including specific data structures for each operation type and behavioral differences between entity/relation/observation deletions.

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 tool's purpose: 'removing elements from your educational knowledge graph' with specific deletion operations (entities, relationships, observations). It distinguishes from siblings like 'buildcontext' (creation) and 'loadcontext' (retrieval) by focusing exclusively on deletion operations.

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

Usage Guidelines5/5

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

The description provides explicit 'When to use this tool' section with 10 specific scenarios (e.g., 'Removing completed or dropped courses', 'Deleting obsolete relationships'), plus a numbered 'You should' section with 11 procedural guidelines. It clearly differentiates when to use this deletion tool versus creation/retrieval siblings.

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

Related 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/tejpalvirk/student'

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