Skip to main content
Glama

my_workflows

Read-only

Retrieve a list of your published AI workflows (glifs) with run counts and creation dates to review and manage your custom agents.

Instructions

Get a list of your published workflows (glifs). Shows your AI workflows with run counts and creation dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'my_workflows' tool. Calls getMyGlifs() API and formats the results into a text response listing workflows with their IDs, descriptions, creation dates, and run counts.
    export async function handler(): Promise<ToolResponse> {
      const glifs = await getMyGlifs();
      const formattedGlifs = glifs
        .map(
          (glif) =>
            `${glif.name} (${glif.id})\n${glif.description}\nCreated: ${new Date(
              glif.createdAt
            ).toLocaleString()}\nRuns: ${glif.completedSpellRunCount}\n`
        )
        .join("\n");
    
      return {
        content: [
          {
            type: "text",
            text: `Your workflows:\n\n${formattedGlifs}`,
          },
        ],
      };
    }
  • The Zod schema for the tool. Empty object (no input parameters required).
    export const schema = z.object({});
  • Registration of the 'my_workflows' tool in the TOOL_REGISTRY under the 'discovery' group, gated by env.discovery.enabled().
    export const TOOL_REGISTRY: ToolGroupConfig[] = [
      {
        name: "core",
        enabled: () => true,
        tools: {
          [glifInfo.definition.name]: glifInfo,
          [runGlif.definition.name]: runGlif,
        },
      },
      {
        name: "discovery",
        enabled: () => env.discovery.enabled(),
        tools: {
          [listFeaturedGlifs.definition.name]: listFeaturedGlifs,
          [searchGlifs.definition.name]: searchGlifs,
          [myGlifs.definition.name]: myGlifs,
          [myGlifUserInfo.definition.name]: myGlifUserInfo,
        },
  • Tool handler setup in the MCP server. Routes tool call requests to the correct handler from the registry.
    export function setupToolHandlers(server: Server) {
      logger.debug("Setting up tool handlers");
    
      server.setRequestHandler(ListToolsRequestSchema, async () => getTools());
    
      server.setRequestHandler(CallToolRequestSchema, async (request) => {
        logger.debug("Tool call received", {
          name: request.params.name,
          args: request.params.arguments,
        });
    
        // Check if this is a GLIF_IDS tool
        const glifIdMatch = request.params.name.match(/^glif_(.+)$/);
        const glifId = glifIdMatch?.[1];
        if (
          glifIdMatch &&
          glifId &&
          GLIF_IDS.includes(glifId) &&
          request.params.arguments
        ) {
          const args = z
            .object({ inputs: z.array(z.string()) })
            .parse(request.params.arguments);
          return runGlif.handler({
            ...request,
            params: {
              ...request.params,
              arguments: {
                id: glifId,
                inputs: args.inputs,
              },
            },
          });
        }
    
        // Handle all registered tools
        const enabledTools = getEnabledTools();
        const tool = enabledTools[request.params.name];
        if (tool) {
          return tool.handler(request);
        }
    
        throw new McpError(
          ErrorCode.MethodNotFound,
          `Unknown tool: ${request.params.name}`
        );
      });
    }
  • The getMyGlifs() helper function that makes the API call to fetch the user's published glifs/workflows.
    export async function getMyGlifs(): Promise<Glif[]> {
      const userId = cachedUserId ?? (await getMyUserInfo()).id;
      logger.debug("getMyGlifs", { userId });
    
      return apiRequest<Glif[]>("/glifs", "get", {
        queryParams: { userId },
        schema: z.array(GlifSchema),
        context: "getMyGlifs",
      });
    }
Behavior3/5

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

Annotations include readOnlyHint=true, which is consistent with the description. The description adds minor behavioral context (what data is shown) but does not cover potential issues like pagination or rate limits. No contradiction with annotations.

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?

Two concise sentences with no fluff. The purpose is front-loaded, and the second sentence adds relevant details. Every word earns its place.

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

Completeness4/5

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

Given no parameters and no output schema, the description adequately explains what the tool returns. It could mention pagination or ordering but is largely sufficient for a simple list tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, so schema coverage is 100%. The description adds value by clarifying that the list is scoped to the user's own workflows, which is not evident from the schema alone.

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 the verb 'get a list', the resource 'your published workflows (glifs)', and specific details like 'run counts and creation dates'. It distinguishes from sibling tools such as list_featured_workflows and search_workflows.

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 implies usage for personal workflows but does not explicitly state when to use this tool over alternatives like list_featured_workflows or search_workflows. No when-not or alternative naming is provided.

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/glifxyz/glif-mcp-server'

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