Skip to main content
Glama
cmendezs

mcp-facture-electronique-fr

update_directory_line

Partially update an existing directory line by modifying only specified fields like technical address, platform ID, or routing code, preserving other data.

Instructions

Partially update an existing directory line. Only the provided fields are modified (PATCH semantics). Typically used to update the technical address after a configuration change on the Approved Platform side.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesInstance identifier of the directory line to update (returned by create_directory_line or search_directory_line).
platform_idNoNew Approved Platform identifier. Use when changing AP (with delete_directory_line on the old one).
technical_addressNoNew technical receiving address.
routing_codeNoNew associated routing code.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration via @mcp.tool() decorator inside register_directory_tools()
    @mcp.tool()
    async def update_directory_line(
        instance_id: Annotated[
            str,
            Field(
                description=(
                    "Instance identifier of the directory line to update "
                    "(returned by create_directory_line or search_directory_line)."
                )
            ),
        ],
        platform_id: Annotated[
            Optional[str],
            Field(
                default=None,
                description=(
                    "New Approved Platform identifier. "
                    "Use when changing AP (with delete_directory_line on the old one)."
                ),
            ),
        ] = None,
        technical_address: Annotated[
            Optional[str],
            Field(
                default=None,
                description="New technical receiving address.",
            ),
        ] = None,
        routing_code: Annotated[
            Optional[str],
            Field(
                default=None,
                description="New associated routing code.",
            ),
        ] = None,
    ) -> dict:
        """
        Partially update an existing directory line.
        Only the provided fields are modified (PATCH semantics).
        Typically used to update the technical address after a
        configuration change on the Approved Platform side.
        """
        client = get_directory_client()
        return await client.update_directory_line(
            instance_id=instance_id,
            platform_id=platform_id,
            technical_address=technical_address,
            routing_code=routing_code,
        )
  • Handler function that delegates to DirectoryClient.update_directory_line with PATCH semantics
    @mcp.tool()
    async def update_directory_line(
        instance_id: Annotated[
            str,
            Field(
                description=(
                    "Instance identifier of the directory line to update "
                    "(returned by create_directory_line or search_directory_line)."
                )
            ),
        ],
        platform_id: Annotated[
            Optional[str],
            Field(
                default=None,
                description=(
                    "New Approved Platform identifier. "
                    "Use when changing AP (with delete_directory_line on the old one)."
                ),
            ),
        ] = None,
        technical_address: Annotated[
            Optional[str],
            Field(
                default=None,
                description="New technical receiving address.",
            ),
        ] = None,
        routing_code: Annotated[
            Optional[str],
            Field(
                default=None,
                description="New associated routing code.",
            ),
        ] = None,
    ) -> dict:
        """
        Partially update an existing directory line.
        Only the provided fields are modified (PATCH semantics).
        Typically used to update the technical address after a
        configuration change on the Approved Platform side.
        """
        client = get_directory_client()
        return await client.update_directory_line(
            instance_id=instance_id,
            platform_id=platform_id,
            technical_address=technical_address,
            routing_code=routing_code,
        )
  • Parameter schema using Pydantic Field annotations defining input types and descriptions
    instance_id: Annotated[
        str,
        Field(
            description=(
                "Instance identifier of the directory line to update "
                "(returned by create_directory_line or search_directory_line)."
            )
        ),
    ],
    platform_id: Annotated[
        Optional[str],
        Field(
            default=None,
            description=(
                "New Approved Platform identifier. "
                "Use when changing AP (with delete_directory_line on the old one)."
            ),
        ),
    ] = None,
    technical_address: Annotated[
        Optional[str],
        Field(
            default=None,
            description="New technical receiving address.",
        ),
    ] = None,
    routing_code: Annotated[
        Optional[str],
        Field(
            default=None,
            description="New associated routing code.",
        ),
    ] = None,
  • HTTP client helper performing PATCH /v1/directory-line/id-instance:{id}
    async def update_directory_line(
        self,
        instance_id: str,
        platform_id: Optional[str] = None,
        technical_address: Optional[str] = None,
        routing_code: Optional[str] = None,
    ) -> dict[str, Any]:
        """PATCH /v1/directory-line/id-instance:{id} — Update a directory line."""
        body: dict[str, Any] = {}
        if platform_id:
            body["platformId"] = platform_id
        if technical_address:
            body["technicalAddress"] = technical_address
        if routing_code:
            body["routingCode"] = routing_code
        response = await self._request(
            "PATCH", f"/v1/directory-line/id-instance:{instance_id}", json=body
        )
        return response.json()
Behavior3/5

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

Without annotations, the description explains PATCH semantics and partial update behavior, but does not disclose other behavioral aspects like idempotency or side effects.

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 two sentences, front-loaded with the main action, and no unnecessary words.

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 presence of an output schema and clear schema descriptions, the tool description adequately covers the intended use, partial update behavior, and typical scenario.

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 already has full description coverage (100%), so the description adds minimal extra meaning beyond the typical use for technical_address.

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 clearly states 'Partially update an existing directory line' with specific verb and resource, and distinguishes from sibling tools like create_directory_line and delete_directory_line.

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

Usage Guidelines4/5

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

It provides a typical use case ('update the technical address after a configuration change'), giving context on when to use, though it does not explicitly exclude other scenarios or mention alternatives.

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/cmendezs/mcp-facture-electronique-fr'

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