get_file_content
Retrieve file contents from Azure DevOps repositories to access code, documentation, or configuration files stored in your projects.
Instructions
Gets the content of a file in a repository.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The path to the file. | |
| project | Yes | The name or ID of the project. | |
| repository_id | Yes | The name or ID of the repository. |
Implementation Reference
- The implementation of the get_file_content handler in AzureDevOpsClient class, which calls git_client.get_item_text to retrieve the file content.def get_file_content(self, project, repository_id, path): return self.git_client.get_item_text( project=project, repository_id=repository_id, path=path )
- mcp_azure_devops/server.py:498-520 (schema)The input schema and tool definition for get_file_content, specifying parameters project, repository_id, and path.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 } ),
- mcp_azure_devops/server.py:1053-1054 (registration)The dispatch/registration point in _execute_tool method where get_file_content is called on the client instance.elif name == "get_file_content": return self.client.get_file_content(**arguments)