OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Retrieves a tool by its ID.
Goal
View detailed tool configuration.
Context
Called when viewing tool details or editing.
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
import { ToolCategoryEnum, ToolStatusEnum } from './tool.enum';
import {
CreateToolInputModel,
ToolModel,
ToolSummaryModel,
UpdateToolInputModel,
} from './tool.schema';
export const GetToolQuery = defineQuery({
meta: {
key: 'agent.tool.get',
version: '1.0.0',
stability: 'stable',
owners: ['@agent-console-team'],
tags: ['tool', 'get'],
description: 'Retrieves a tool by its ID.',
goal: 'View detailed tool configuration.',
context: 'Called when viewing tool details or editing.',
},
io: {
input: defineSchemaModel({
name: 'GetToolInput',
fields: {
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
},
}),
output: ToolModel,
errors: {
TOOL_NOT_FOUND: {
description: 'The specified tool does not exist',
http: 404,
gqlCode: 'TOOL_NOT_FOUND',
when: 'Tool ID is invalid',
},
},
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'get-tool-happy-path',
given: ['Tool exists'],
when: ['User requests tool by ID'],
then: ['Tool details are returned'],
},
],
examples: [
{
key: 'get-basic',
input: { toolId: 'tool-123' },
output: {
id: 'tool-123',
name: 'Weather API',
status: 'active',
category: 'api',
},
},
],
},
});