Skip to main content
Glama
panther-labs

Panther MCP Server

Official

get_http_log_source

Read-only

Retrieve configuration details for an HTTP log source by ID to troubleshoot and monitor webhook integrations.

Instructions

Get detailed information about a specific HTTP log source by ID.

HTTP log sources are used to collect logs via HTTP endpoints/webhooks. This tool provides detailed configuration information for troubleshooting and monitoring HTTP log source integrations.

Args: source_id: The ID of the HTTP log source to retrieve

Returns: Dict containing: - success: Boolean indicating if the query was successful - source: HTTP log source information if successful, containing: - integrationId: The source ID - integrationLabel: The source name/label - logTypes: List of log types this source handles - logStreamType: Stream type (Auto, JSON, JsonArray, etc.) - logStreamTypeOptions: Additional stream type configuration - authMethod: Authentication method (None, Bearer, Basic, etc.) - authBearerToken: Bearer token if using Bearer auth - authUsername: Username if using Basic auth - authPassword: Password if using Basic auth - authHeaderKey: Header key for HMAC/SharedSecret auth - authSecretValue: Secret value for HMAC/SharedSecret auth - authHmacAlg: HMAC algorithm if using HMAC auth - message: Error message if unsuccessful

Permissions:{'all_of': ['View Log Sources']}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_idYesThe ID of the HTTP log source to fetch

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Full implementation of the get_http_log_source tool handler, including inline input schema via Annotated Field, @mcp_tool decorator for registration, and the core logic using REST client to fetch HTTP log source details from Panther.
    @mcp_tool(
        annotations={
            "permissions": all_perms(Permission.LOG_SOURCE_READ),
            "readOnlyHint": True,
        }
    )
    async def get_http_log_source(
        source_id: Annotated[
            str,
            Field(
                description="The ID of the HTTP log source to fetch",
                examples=["http-source-123", "webhook-collector-456"],
            ),
        ],
    ) -> dict[str, Any]:
        """Get detailed information about a specific HTTP log source by ID.
    
        HTTP log sources are used to collect logs via HTTP endpoints/webhooks.
        This tool provides detailed configuration information for troubleshooting
        and monitoring HTTP log source integrations.
    
        Args:
            source_id: The ID of the HTTP log source to retrieve
    
        Returns:
            Dict containing:
            - success: Boolean indicating if the query was successful
            - source: HTTP log source information if successful, containing:
                - integrationId: The source ID
                - integrationLabel: The source name/label
                - logTypes: List of log types this source handles
                - logStreamType: Stream type (Auto, JSON, JsonArray, etc.)
                - logStreamTypeOptions: Additional stream type configuration
                - authMethod: Authentication method (None, Bearer, Basic, etc.)
                - authBearerToken: Bearer token if using Bearer auth
                - authUsername: Username if using Basic auth
                - authPassword: Password if using Basic auth
                - authHeaderKey: Header key for HMAC/SharedSecret auth
                - authSecretValue: Secret value for HMAC/SharedSecret auth
                - authHmacAlg: HMAC algorithm if using HMAC auth
            - message: Error message if unsuccessful
        """
        logger.info(f"Fetching HTTP log source: {source_id}")
    
        try:
            # Execute the REST API call
            async with get_rest_client() as client:
                response_data, status_code = await client.get(
                    f"/log-sources/http/{source_id}"
                )
    
            logger.info(f"Successfully retrieved HTTP log source: {source_id}")
    
            # Format the response
            return {
                "success": True,
                "source": response_data,
            }
        except Exception as e:
            logger.error(f"Failed to fetch HTTP log source: {str(e)}")
            return {
                "success": False,
                "message": f"Failed to fetch HTTP log source: {str(e)}",
            }
  • The @mcp_tool decorator registers this function as an MCP tool with required permissions.
    @mcp_tool(
        annotations={
            "permissions": all_perms(Permission.LOG_SOURCE_READ),
            "readOnlyHint": True,
        }
    )
  • Input schema definition for the source_id parameter using Pydantic Field for description and examples.
    source_id: Annotated[
        str,
        Field(
            description="The ID of the HTTP log source to fetch",
            examples=["http-source-123", "webhook-collector-456"],
        ),
    ],
Behavior4/5

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

Annotations already declare readOnlyHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond this by explaining that HTTP log sources are for 'collecting logs via HTTP endpoints/webhooks' and that the tool provides 'detailed configuration information for troubleshooting and monitoring.' It also includes permissions information ('View Log Sources'), which is crucial for access control. No contradictions with annotations exist.

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 a clear purpose statement, context about HTTP log sources, and detailed return value documentation. It's appropriately sized for a tool with complex output, though the extensive Returns section could be streamlined since an output schema exists. Most sentences earn their place, but there's some redundancy in parameter documentation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (single parameter but detailed output), the description is highly complete. It explains the purpose, provides context about HTTP log sources, documents the parameter, and details the return structure comprehensively. With annotations covering read-only behavior and an output schema likely available, the description adds all necessary contextual information without gaps.

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?

The input schema has 100% description coverage, with the parameter 'source_id' well-documented in the schema. The description adds minimal value by restating 'The ID of the HTTP log source to retrieve' in the Args section, which is redundant with the schema. However, it doesn't provide additional semantic context beyond what the schema already offers, so it meets the baseline for high schema coverage.

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: 'Get detailed information about a specific HTTP log source by ID.' It specifies the verb ('Get'), resource ('HTTP log source'), and scope ('by ID'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_log_sources' beyond the 'by ID' detail, which is why it doesn't reach a perfect score.

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 by stating that HTTP log sources 'are used to collect logs via HTTP endpoints/webhooks' and that this tool is for 'troubleshooting and monitoring HTTP log source integrations.' However, it lacks explicit guidance on when to use this tool versus alternatives like 'list_log_sources' or other sibling tools, leaving the agent to infer based on the 'by ID' requirement.

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/panther-labs/mcp-panther'

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