airbyte_ops_mcp.mcp.session_namer
MCP tool for Devin session naming.
This module exposes a Devin-specific session naming tool as an MCP endpoint. It is a thin wrapper around the generic friendly-name generator in the session_namer module, hard-wired to the silly-buddy scheme with Title Case output and a contextual "aka Devin" suffix.
MCP reference
MCP primitives registered by the session_namer module of the airbyte-internal-ops server: 1 tool(s), 0 prompt(s), 0 resource(s).
Tools (1)
get_devin_session_name
Hints: read-only · idempotent
Look up the deterministic friendly name for a Devin session.
Uses the silly-buddy naming scheme to generate a Title Case two-word name (e.g. "Smelly Fred") from the session ID. The output is immutable and idempotent — the same session ID always yields the same name.
If a full URL is provided instead of a bare ID, the session ID is extracted from the URL automatically.
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
session_id |
string |
yes | — | The Devin session identifier or session URL. Accepts a raw session ID (e.g. 'b2a641e838214f91b50d0f88940ac119') or a full session URL (e.g. 'https://app.devin.ai/sessions/b2a641e8...'). The ID is extracted automatically from URLs. The same ID always produces the same name — this is a deterministic lookup, not a creation. |
Show input JSON schema
{
"additionalProperties": false,
"properties": {
"session_id": {
"description": "The Devin session identifier or session URL. Accepts a raw session ID (e.g. 'b2a641e838214f91b50d0f88940ac119') or a full session URL (e.g. 'https://app.devin.ai/sessions/b2a641e8...'). The ID is extracted automatically from URLs. The same ID always produces the same name \u2014 this is a deterministic lookup, not a creation.",
"type": "string"
}
},
"required": [
"session_id"
],
"type": "object"
}
Show output JSON schema
{
"description": "Response from the Devin session naming tool.",
"properties": {
"session_id": {
"description": "The input session ID",
"type": "string"
},
"scheme_version": {
"description": "The naming scheme version identifier",
"type": "string"
},
"name": {
"description": "The generated human-friendly session name in Title Case",
"type": "string"
},
"full_name": {
"description": "The contextual full name including 'Devin' suffix (e.g. 'Silly Fred Devin')",
"type": "string"
}
},
"required": [
"session_id",
"scheme_version",
"name",
"full_name"
],
"type": "object"
}
1# Copyright (c) 2025 Airbyte, Inc., all rights reserved. 2"""MCP tool for Devin session naming. 3 4This module exposes a Devin-specific session naming tool as an MCP endpoint. 5It is a thin wrapper around the generic friendly-name generator in the 6session_namer module, hard-wired to the silly-buddy scheme with Title Case 7output and a contextual "aka Devin" suffix. 8 9## MCP reference 10 11.. include:: ../../../docs/mcp-generated/session_namer.md 12 :start-line: 2 13""" 14 15from __future__ import annotations 16 17__all__: list[str] = [] 18 19from typing import Annotated 20 21from fastmcp import FastMCP 22from fastmcp_extensions import mcp_tool, register_mcp_tools 23from pydantic import BaseModel, Field 24 25from airbyte_ops_mcp.session_namer import ( 26 NamingScheme, 27 extract_session_id, 28 generate_friendly_name, 29) 30 31 32class DevinSessionNameResponse(BaseModel): 33 """Response from the Devin session naming tool.""" 34 35 session_id: str = Field(description="The input session ID") 36 scheme_version: str = Field(description="The naming scheme version identifier") 37 name: str = Field( 38 description="The generated human-friendly session name in Title Case" 39 ) 40 full_name: str = Field( 41 description="The contextual full name including 'Devin' suffix (e.g. 'Silly Fred Devin')" 42 ) 43 44 45@mcp_tool( 46 read_only=True, 47 idempotent=True, 48) 49def get_devin_session_name( 50 session_id: Annotated[ 51 str, 52 "The Devin session identifier or session URL. Accepts a raw session " 53 "ID (e.g. 'b2a641e838214f91b50d0f88940ac119') or a full session URL " 54 "(e.g. 'https://app.devin.ai/sessions/b2a641e8...'). The ID is " 55 "extracted automatically from URLs. The same ID always produces " 56 "the same name — this is a deterministic lookup, not a creation.", 57 ], 58) -> DevinSessionNameResponse: 59 """Look up the deterministic friendly name for a Devin session. 60 61 Uses the silly-buddy naming scheme to generate a Title Case two-word 62 name (e.g. "Smelly Fred") from the session ID. The output is immutable 63 and idempotent — the same session ID always yields the same name. 64 65 If a full URL is provided instead of a bare ID, the session ID is 66 extracted from the URL automatically. 67 """ 68 resolved_id = extract_session_id(session_id) 69 scheme = NamingScheme.SILLY_BUDDY 70 name = generate_friendly_name(resolved_id, scheme) 71 full_name = f"{name} Devin" 72 return DevinSessionNameResponse( 73 session_id=resolved_id, 74 scheme_version="v1", 75 name=name, 76 full_name=full_name, 77 ) 78 79 80def register_session_namer_tools(app: FastMCP) -> None: 81 """Register session namer tools with the FastMCP app.""" 82 register_mcp_tools(app, mcp_module=__name__)