Skip to main content
Glama

add-note

Create and store notes for DICOM medical images to document observations, findings, or annotations directly within the imaging workflow.

Instructions

Add a new note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
contentYes

Implementation Reference

  • The handler function for the 'add-note' tool within the @server.call_tool() method. It extracts 'name' and 'content' from arguments, validates them, stores the note in the global 'notes' dict, notifies clients of resource list changes, and returns a TextContent confirmation.
    if name == "add-note":
        note_name = arguments.get("name")
        content = arguments.get("content")
    
        if not note_name or not content:
            raise ValueError("Missing name or content")
    
        # Update server state
        notes[note_name] = content
    
        # Notify clients that resources have changed
        await server.request_context.session.send_resource_list_changed()
    
        return [
            types.TextContent(
                type="text",
                text=f"Added note '{note_name}' with content: {content}",
            )
        ]
  • Registration of the 'add-note' tool in the @server.list_tools() handler, including name, description, and input schema definition.
    types.Tool(
        name="add-note",
        description="Add a new note",
        inputSchema={
            "type": "object",
            "properties": {
                "name": {"type": "string"},
                "content": {"type": "string"},
            },
            "required": ["name", "content"],
        },
    ),
  • JSON schema for 'add-note' tool inputs, requiring 'name' and 'content' as strings.
    inputSchema={
        "type": "object",
        "properties": {
            "name": {"type": "string"},
            "content": {"type": "string"},
        },
        "required": ["name", "content"],
    },
  • Global dictionary used to store notes by name, serving as the persistent storage for the 'add-note' tool.
    notes: dict[str, str] = {}  # Keep the notes functionality for backward compatibility
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Add a new note' implies a write operation but doesn't specify permissions, side effects, or response format. It lacks details on whether this is destructive, requires authentication, or has rate limits, making it inadequate for a mutation tool with zero annotation coverage.

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 concise with a single sentence 'Add a new note', which is appropriately sized for a simple tool. It's front-loaded and wastes no words, though it could benefit from more detail. The brevity is efficient but leads to under-specification rather than true conciseness.

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

Completeness1/5

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

Given the tool's complexity (a write operation with two parameters), lack of annotations, no output schema, and 0% schema description coverage, the description is incomplete. It fails to explain the tool's role in the DICOM context hinted by sibling tools, doesn't detail parameters or behavior, and leaves critical gaps for the agent to operate effectively.

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

Parameters1/5

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

The description adds no parameter semantics beyond what the input schema provides. With 0% schema description coverage and two required parameters ('name' and 'content'), the description doesn't explain what these parameters represent, their formats, or constraints. For example, it doesn't clarify if 'name' is a filename, title, or identifier, or what 'content' should contain.

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

Purpose2/5

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

The description 'Add a new note' is a tautology that restates the tool name 'add-note' with minimal elaboration. It specifies the verb 'add' and resource 'note' but lacks any distinguishing details about what kind of note, where it's added, or its purpose. Compared to sibling tools like 'crop-dicom-image' or 'extract-dicom-metadata', this provides no differentiation.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. There are no mentions of prerequisites, context, or exclusions. Given the sibling tools are all DICOM-related (e.g., 'crop-dicom-image', 'load-dicom-series'), it's unclear if this tool is part of the same DICOM workflow or serves a different purpose, leaving the agent with no usage direction.

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/shaunporwal/DICOM-MCP'

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