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
| Name | Required | Description | Default |
|---|---|---|---|
| instance_id | Yes | Instance identifier of the directory line to update (returned by create_directory_line or search_directory_line). | |
| platform_id | No | New Approved Platform identifier. Use when changing AP (with delete_directory_line on the old one). | |
| technical_address | No | New technical receiving address. | |
| routing_code | No | New associated routing code. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/directory_tools.py:631-679 (registration)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, ) - tools/directory_tools.py:631-679 (handler)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, ) - tools/directory_tools.py:633-665 (schema)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, - clients/directory_client.py:208-226 (helper)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()