Skip to main content
Glama

info

Retrieve model metadata from HuggingFace including architecture, parameters, size, and specifications for quantization planning.

Instructions

Get model info from HuggingFace — parameters, size, architecture.

Lightweight call using the HuggingFace API. No GPU or heavy dependencies required.

Args: model: HuggingFace model ID (e.g. 'meta-llama/Llama-3.1-8B-Instruct') or local path to a model directory.

Returns: Model metadata including architecture, parameter count, size, hidden dimensions, number of layers, vocabulary size, and context length.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The "info" tool is registered here and defines the handler that calls `get_model_info` and formats the returned dictionary.
    @mcp.tool()
    def info(model: str) -> dict[str, Any]:
        """Get model info from HuggingFace — parameters, size, architecture.
    
        Lightweight call using the HuggingFace API. No GPU or heavy
        dependencies required.
    
        Args:
            model: HuggingFace model ID (e.g. 'meta-llama/Llama-3.1-8B-Instruct')
                   or local path to a model directory.
    
        Returns:
            Model metadata including architecture, parameter count, size,
            hidden dimensions, number of layers, vocabulary size, and
            context length.
        """
        result = get_model_info(model)
    
        if not result.get("found"):
            return {
                "error": f"Model not found: {result.get('error', 'unknown')}",
                "model": model,
            }
    
        # Build a clean response (strip internal fields like raw config)
        output = {
            "model": result.get("model_id", result.get("source")),
            "found": True,
            "architecture": result.get("arch", "unknown"),
            "parameters": result.get("params_human", "unknown"),
            "size": result.get("size_human", "unknown"),
            "size_bytes": result.get("size_bytes", 0),
            "hidden_size": result.get("hidden_size", 0),
            "num_layers": result.get("num_layers", 0),
            "vocab_size": result.get("vocab_size", 0),
            "context_length": result.get("context_length", 0),
        }
    
        if result.get("local"):
            output["local"] = True
    
        # Add compression estimates
        if result.get("size_bytes"):
            sz = result["size_bytes"]
            output["estimated_sizes"] = {
                "4bit": format_size(sz / estimate_compression(16, 4)),
                "8bit": format_size(sz / estimate_compression(16, 8)),
            }
    
        return output
Behavior4/5

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

With no annotations provided, the description carries the full burden. It successfully discloses key behavioral traits: external API dependency (HuggingFace API), resource requirements (no GPU/lightweight), and return value structure. Minor gap: doesn't mention authentication requirements or rate limits.

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, behavioral notes, args, returns) and front-loaded with the core action. Every sentence adds value. Minor deduction for using formal 'Args:' and 'Returns:' docstring headers which are slightly less conversational than optimal.

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 the tool's simplicity (1 parameter) and existence of an output schema, the description is appropriately complete. It proactively enumerates the specific metadata fields returned (architecture, parameter count, etc.), adding value beyond the schema. No critical gaps for this complexity level.

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?

Schema description coverage is 0%, so the description fully compensates. It provides the parameter name, format specification ('HuggingFace model ID'), a concrete working example ('meta-llama/Llama-3.1-8B-Instruct'), and alternative input format ('local path'), giving complete semantic context for the single parameter.

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 opens with a specific verb-resource combination ('Get model info from HuggingFace') and enumerates scope ('parameters, size, architecture'). It clearly distinguishes this metadata retrieval tool from action-oriented siblings like 'push', 'quantize', and 'evaluate'.

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

Usage Guidelines3/5

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

The description provides implied usage context ('Lightweight call...No GPU or heavy dependencies required'), indicating when this is appropriate (quick metadata checks). However, it lacks explicit when-not guidance or named alternatives among siblings like 'check' or 'evaluate'.

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/ShipItAndPray/mcp-turboquant'

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