Skip to main content
Glama

get_file_content

Retrieve file content from Azure DevOps repositories to access code, documentation, or configuration files for development workflows.

Instructions

Gets the content of a file in a repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
repository_idYesThe name or ID of the repository.
pathYesThe path to the file.

Implementation Reference

  • The core handler function that implements the logic to retrieve file content from an Azure DevOps repository using the Git client API.
    def get_file_content(self, project, repository_id, path):
        return self.git_client.get_item_text(
            project=project,
            repository_id=repository_id,
            path=path
        )
  • Tool registration in the MCP server, defining the tool name, description, and input schema for validation.
    types.Tool(
        name="get_file_content",
        description="Gets the content of a file in a repository.",
        inputSchema={
            "type": "object",
            "properties": {
                "project": {
                    "type": "string", 
                    "description": "The name or ID of the project."
                },
                "repository_id": {
                    "type": "string", 
                    "description": "The name or ID of the repository."
                },
                "path": {
                    "type": "string", 
                    "description": "The path to the file."
                },
            },
            "required": ["project", "repository_id", "path"],
            "additionalProperties": False
        }
    ),
  • Dispatch handler in the server's _execute_tool method that invokes the AzureDevOpsClient's get_file_content method with parsed arguments.
    elif name == "get_file_content":
        return self.client.get_file_content(**arguments)
Behavior2/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. While 'Gets' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns raw text or structured data, or handles errors like missing files. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 that states the core functionality without any fluff. It's appropriately sized for a straightforward tool and front-loads the essential information, making it easy to parse quickly.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the returned content looks like (e.g., text, binary, metadata), error conditions, or prerequisites like repository access. For a tool that retrieves file content, this leaves critical context gaps for an agent.

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 all three parameters clearly documented in the schema itself. The description adds no additional parameter information beyond implying that 'path' refers to a file path, which is already covered. This meets the baseline for high schema coverage without adding extra value.

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 tool's purpose with a specific verb ('Gets') and resource ('content of a file in a repository'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_files' or 'get_wiki_page', which could cause confusion about when to use each.

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. With siblings like 'list_files' (which likely lists files without content) and 'get_wiki_page' (which might retrieve wiki content), the agent has no explicit direction on tool selection, leaving usage context entirely implicit.

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/xrmghost/mcp-azure-devops'

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