Skip to main content
Glama

get_record

Retrieve a specific record by ID from a resource using the resource URI and record ID for precise data access and management in MCP Template servers.

Instructions

Get a specific record by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordIdYesID of the record to retrieve
resourceUriYesURI of the resource

Implementation Reference

  • The handler logic for the 'get_record' tool in the handleCallTool switch statement. It validates input, fetches the resource, and returns a placeholder record info.
    case 'get_record': {
      return await safeExecute(toolName, async () => {
        const args = validateInput(GetRecordArgsSchema, request.params.arguments);
        const resource = await this.dataService.getResource(args.resourceUri);
        // In a real implementation, you would fetch the specific record
        // This is a placeholder for the template
        return { id: args.recordId, resource: resource.name };
      });
    }
  • Registration of the 'get_record' tool in the handleListTools method, including name, description, and input schema reference.
      name: 'get_record',
      description: 'Get a specific record by ID',
      inputSchema: getInputSchema(GetRecordArgsSchema),
    },
  • Zod schema definition for GetRecordArgs used by the 'get_record' tool.
    export const GetRecordArgsSchema = z.object({
      resourceUri: z.string().describe('URI of the resource'),
      recordId: z.string().describe('ID of the record to retrieve'),
    });
  • TypeScript type inferred from the GetRecordArgsSchema.
    export type GetRecordArgs = z.infer<typeof GetRecordArgsSchema>;
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a read operation ('Get'), implying safety, but doesn't mention error handling (e.g., what happens if the ID is invalid), permissions required, rate limits, or return format. This leaves significant gaps for a tool with two required parameters.

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?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place without redundancy.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., record data or error), behavioral traits like idempotency, or how it differs from siblings. Given the complexity of retrieval operations and lack of structured data, more context is needed.

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 description coverage is 100%, with clear parameter descriptions in the schema (e.g., 'ID of the record to retrieve'). The description adds no additional meaning beyond implying 'recordId' is used for retrieval, which is already covered. Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('record') with the specific mechanism ('by ID'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'list_records' or 'search_records' which also retrieve records but with different mechanisms.

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

Usage Guidelines2/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 like 'list_records' or 'search_records'. It mentions retrieving by ID but doesn't specify prerequisites (e.g., needing the ID) or exclusions (e.g., not for bulk retrieval).

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/kbhuw/MCP_TEMPLATE'

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