Skip to main content
Glama
murilojrpereira

mcp-graphql-bridge

get_type_details

Retrieve the fields of a specified GraphQL type to construct accurate field selections for queries.

Instructions

Get fields of a specific GraphQL type to know what to put in __fields

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNameYesGraphQL type name, e.g. 'Machine', 'WorkOrder', 'Shift'

Implementation Reference

  • src/index.ts:312-312 (registration)
    Registration of the 'get_type_details' tool via server.tool()
    "get_type_details",
  • Zod schema for the tool's input parameter: typeName (string)
    {
      typeName: z
        .string()
        .describe("GraphQL type name, e.g. 'Machine', 'WorkOrder', 'Shift'"),
    },
  • Handler function that executes the tool logic: queries GraphQL __type introspection and returns fields
    async ({ typeName }) => {
      const query = `
        query GetType($name: String!) {
          __type(name: $name) {
            name kind description
            fields {
              name description
              type { kind name ofType { kind name ofType { kind name } } }
            }
            inputFields {
              name description
              type { kind name ofType { kind name } }
            }
            enumValues { name description }
          }
        }
      `;
      try {
        const data = await client.request(query, { name: typeName });
        return {
          content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
        };
      } catch (err) {
        const msg = err instanceof Error ? err.message : String(err);
        return {
          content: [{ type: "text", text: `Error: ${msg}` }],
          isError: true,
        };
      }
    }
Behavior2/5

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

No annotations are provided. The description only says 'Get fields' without disclosing read-only nature, side effects, or auth needs. Minimal transparency.

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?

Single sentence, front-loaded with purpose, no filler. Efficient.

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?

Tool is simple with one parameter and one sibling. Description is adequate but lacks output format hint. Still mostly complete for its complexity.

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

Parameters4/5

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

Schema covers the parameter fully. Description adds context: 'to know what to put in __fields', explaining why the parameter is useful beyond its type.

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 what the tool does: get fields of a GraphQL type. It is a specific verb+resource and distinguishes from the sibling tool execute_graphql.

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

Usage Guidelines4/5

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

Implied usage: 'to know what to put in __fields' suggests it's for building GraphQL queries. However, no explicit when-not-to-use or alternative guidance.

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/murilojrpereira/mcp-graphql-bridge'

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