Skip to main content
Glama
domdomegg

openfoodfacts-mcp

Get API docs

get_api_docs
Read-only

Retrieve API documentation for Open Food Facts to understand available endpoints and data structures before making API calls.

Instructions

Get Open Food Facts API documentation. Useful for understanding available endpoints before using call_api.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler function that returns the API documentation as text.
    	async (): Promise<CallToolResult> => ({
    		content: [{type: 'text' as const, text: API_DOCS}],
    	}),
    );
  • Registration function for the 'get_api_docs' tool.
    export function registerGetApiDocs(server: McpServer): void {
    	server.registerTool(
    		'get_api_docs',
    		{
    			title: 'Get API docs',
    			description: 'Get Open Food Facts API documentation. Useful for understanding available endpoints before using call_api.',
    			annotations: {
    				readOnlyHint: true,
    			},
    		},
    		async (): Promise<CallToolResult> => ({
    			content: [{type: 'text' as const, text: API_DOCS}],
    		}),
    	);
    }
Behavior3/5

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

Annotations declare readOnlyHint=true, confirming safe read operation. Description adds context that the documentation is for 'understanding available endpoints', which explains the content's purpose. However, it does not describe return format, size, or structure of the documentation beyond this.

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 with zero waste. First sentence establishes function; second establishes usage context. Perfectly front-loaded and appropriately sized for a zero-parameter tool.

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 zero parameters and readOnly annotation, description adequately covers purpose and usage rationale. Would benefit from brief indication of documentation return format (e.g., structured endpoints list vs. raw markdown), but sufficient for tool selection.

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?

Zero parameters present, which warrants baseline score of 4 per scoring rules. No parameter explanation needed in description.

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?

Description uses specific verb 'Get' with clear resource 'Open Food Facts API documentation'. It distinguishes from sibling tool 'call_api' by stating this retrieves documentation (not live data), and clarifies the scope is for 'understanding available endpoints'.

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?

Explicitly states when to use: 'before using call_api'. This provides clear temporal guidance and implicitly identifies the alternative (call_api), helping the agent understand this is a prerequisite step rather than the main action tool.

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/domdomegg/openfoodfacts-mcp'

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